<%@ page language="java" import="java.util.*" pageEncoding="gbk"%>
<%@ page import="databean.mydata" %>
<%@ page import="java.sql.*" %>
<%@ page import="databean.User" %>
<%@ page import="databean.*" %>
<%@ page import="java.util.ArrayList" %>
<%@ page import="javax.servlet.http.HttpSession" %>
<jsp:useBean id="my" class="databean.User" scope="page"></jsp:useBean>
<jsp:useBean id="myrecord" class="databean.RecordBean" scope="page"></jsp:useBean>

 <%
 	String name = (String)session.getAttribute("name");
 	String rs = my.getMessage(name);
 	String mail = rs;
 	ArrayList<MyRecord> arr = myrecord.getAllRecord(name);
 	%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    
    <title>My JSP 'success.jsp' starting page</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->

  </head>
  
  <body>
    Success! <br>
    <%=mail %>
    <table >
    	<% for(int i = 0; i<arr.size();i++) {
    		MyRecord mr = (MyRecord)arr.get(i);
    	 %>
    	 <tr>
    	 	<td><%=mr.getRecordId() %></td>
    	 	<td><%=mr.getProductId() %></td>
    	 	<td><%=mr.getProductname() %></td>
    	 	<td><%=mr.getAmount() %></td>
    	 	<td><%=mr.getBuyTime() %></td>
    	 	<td><%=mr.getValuePer() %></td>
    	 </tr>
    	 <%} %>
    	 
    </table>
    
  </body>
</html>
